1. Field of the Invention
The present invention generally relates to an image scanning apparatus and, more particularly, to an image scanning apparatus which scans both sides of an original sheet and outputs image data after encoding. The present invention also relates to an image data outputting apparatus and, more particularly, to an image data outputting apparatus which decodes encoded image data obtained by scanning both sides of an original sheet.
2. Description of the Related Art
In a conventional image scanning apparatus serving as a part of a facsimile apparatus, an image filing apparatus or an image scanner, a scanning operation for one side of an original sheet and a scanning operation for the other side of the original sheet may be concurrently performed. Each scanning operation is performed on a line by line basis, and one line image data of one side and one line image data of the other side are alternately synthesized line by line. The thus-obtained image data (both-sides-synthesized image data) is compressed and encoded by a single encoder, and the encoded image data is output to an external apparatus. The encoded image data is referred to as encoded both-sides-synthesized image data. It should be noted that, in a facsimile apparatus, the encoded both-sides-synthesized image data is output after it is temporarily stored in a memory, or directly output to a remote facsimile apparatus. In a case of an image filing apparatus, the encoded both-sides-synthesized image data is stored in a memory unit such as a hard disc apparatus. In a case of an image scanner, the encoded both-sides-synthesized image data is transferred to an upper-order apparatus such as a personal computer via an interface.
In order to encode the both-sides-synthesized image data, an arithmetic encoding may be used such as the one used in the JBIG (Joint Bi-level Image Coding Experts Group) encoding method which can achieve a high compression ratio. In such a case, since the above-mentioned both-sides-synthesized image data is input to the encoder for encoding, one line image data of one side and one line image data of the other side are alternately input to the encoder on a line after line basis.
The JBIG encoding method uses a group of reference pixels adjacent to a current pixel which is being encoded so as to perform an arithmetic encoding on a result of prediction of the current pixel to be encoded. The group of reference pixels adjacent to the current pixel to be encoded is referred to as a template. As for the reference pixels forming the template, pixels adjacent to the current pixel and located in predetermined positions are selected or extracted from among pixels included in the current line which includes the current pixel, the immediately preceding line and the second immediately preceding line.
If the arithmetic encoding is performed on the current pixel by using reference pixels extracted from the above-mentioned three lines, pixels which are not related to the current pixel are included in the reference pixels. That is, pixels included in the immediately preceding line come from the opposite side of the original sheet and are not related to the current pixel (current line). Accordingly, an accuracy of prediction of a pixel value of the current pixel is decreased, which causes a problem in that a compression ratio is decreased.
In order to solve such a problem, the inventor of the present application suggested a technique in Japanese Patent Application No. 8-115692. In this technique, the reference pixels are extracted from the current line and every other line starting from the current line so as to extract pixels from the same side of the original sheet on which the current pixel is located so that a compression ratio of the image data is prevented from being decreased. It should be noted that the Japanese Patent Application No. 8-115692 was laid open on Oct. 31, 1997 as Japanese Laid-Open Patent Application No. 9-284438 and, thus, this patent application cannot be a prior art.
However, in order to achieve the above-mentioned technique, a line memory which can store five lines is needed since two extra lines must be stored in the line memory. That is, three lines including the current line are required for one side of the original sheet and the extra two lines are required for the other side of the original sheet. This creates another problem in that a capacity of the line memory must be increased as compared to the conventional line memory that generally has a capacity for storing three lines.
The same problem may occur in an image outputting apparatus when the encoded both-sides-synthesized image data is decoded and the decoded image data is output by being separated one side from the other. Specifically, in a case of a facsimile apparatus, the same problem may occur when the received encoded both-sides-synthesized image data is decoded and is recorded on a recording paper on a one-side basis. Additionally, in a case of a filing apparatus, the same problem may occur when the encoded both-sides-synthesized image data stored in a memory unit is decoded and is displayed on a one-side basis.
In the image outputting apparatus which decodes the encoded both-sides-synthesized image data, the same kind of template used in the image scanning apparatus is used so as to decode the encoded both-sides-synthesized image data. Accordingly, a line memory which can store five lines is needed since two extra lines must be stored in the line memory. That is, three lines including the current line are required for one side of the original sheet and the two extra lines are required for the other side of the original sheet. This creates a problem similar to that occurring in the above-mentioned image scanning apparatus in that a capacity of the line memory must be increased as compared to the conventional line memory which generally has a capacity for storing three lines.